package eu.news.data.pojo;

import java.util.Date;
import java.util.Set;

/**
 * 新闻实体
 * @author WZZ
 *
 */
public abstract class News implements Entity {
	
	/**
	 * 获取ID
	 */
	public abstract int getId();

	/**
	 * 设置ID
	 * @param int id
	 */
	public abstract void setId(int id);

	/**
	 * 获取新闻标题
	 */
	public abstract String getTitle();

	/**
	 * 设置新闻标题
	 * @param String title
	 */
	public abstract void setTitle(String title);

	/**
	 * 获取新闻内容
	 */
	public abstract String getContent();

	/**
	 * 设置新闻内容
	 * @param content
	 */
	public abstract void setContent(String content);

	/**
	 * 获取新闻标题
	 */
	public abstract Sort getSort();

	/**
	 * 设置新闻分类
	 * @param sort
	 */
	public abstract void setSort(Sort sort);

	/**
	 * 获取用户
	 */
	public abstract Operator getOperator();

	public abstract void setOperator(Operator operator);

	public abstract Set<? extends Comment> getComments();

	public abstract void setComments(Set<? extends Comment> comments);

	public abstract int getView();

	public abstract void setView(int view);
	
	public abstract Date getTime();

	public abstract void setTime(Date time);

	public abstract int getState();

	public abstract void setState(int state);

	public abstract Set<? extends Attachment> getAttachs();

	public abstract void setAttachs(Set<? extends Attachment> attachs);

	public abstract Set<? extends Picture> getPictures();

	public abstract void setPictures(Set<? extends Picture> pictures);

	public abstract int getType();

	public abstract void setType(int type);
	
	/**
	 * 新闻状态
	 * @author WZZ
	 *
	 */
	public static class State {
		/**
		 * 编辑状态
		 */
		public static final int STATE_EDIT = 0;
		/**
		 * 未审核
		 */
		public static final int STATE_UNVERIFIED = 1;
		/**
		 * 已经发布
		 */
		public static final int STATE_PUBLISHED = 2;
	}
	
	/**
	 * 新闻类型
	 * @author WZZ
	 *
	 */
	public static class Type {
		/**
		 * 正常新闻
		 */
		public static final int NORMAL = 0;
		/**
		 * 相册新闻
		 */
		public static final int PICTURE = 1;
	}
}
